home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Packing numbers ?????
- Date: Sat, 10 Feb 96 00:10:32 GMT
- Organization: none
- Message-ID: <823911032snz@genesis.demon.co.uk>
- References: <4fcudb$gnm@enterprise.america.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4fcudb$gnm@enterprise.america.com>
- ngreen@enterprise.america.com "Nils Green" writes:
-
- >I need to be able to pack a 6 digit number in a 4 digit number. The
- >numbers are julian dates, and we need the ability of storing them as
- >4 digit numbers. Are there any algorithms, preferably not too complex,
- >that can accomplish this?
-
- Lets say we pack a year into 366 days. 4 digits gives you 10000 values hence
- 10000/366 i.e. just over 27 years. If that is adequate then the problem
- is easy enough. If not then you will need more than 4 digits.
-
- >Please reply via e-mail, since I infrequently browse throught this group.
-
- Wouldn't it be a good idea to review that policy while you have a question
- outstanding in the newsgroup, even if you only follow the one particular
- thread? Answers in the newsgroup can generate further discussion which
- may be of use to you.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-